<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
Connection con = null;
Statement st = null;
try{
	Class.forName("com.mysql.jdbc.Driver");
	con = DriverManager.getConnection("jdbc:mysql://localhost:3306/person","root","lishanshan");
	st = con.createStatement();
	request.setCharacterEncoding("UTF-8");
	String id = request.getParameter("id");
	String sql="delete from Person where id='"+id+"'";
	int result = st.executeUpdate(sql);
	out.println("<a href =\""+request.getContextPath()+"/infor.jsp\">返回预案列表</a>");
}catch(SQLException e){
	e.printStackTrace();
}finally{
	try{
		st.close();
		con.close();
	}catch(SQLException e){
		e.printStackTrace();
	}
}
%>
</body>
</html>

